import React from "react";
import { Link } from "react-router-dom";
import "./Footer.less";

class Footer extends React.Component {
  constructor() {
    super();
  }

  render() {
    let { page } = this.props;
    return (
      <div className="footer flex jc-sa aic">
        <Link to="/" className={`flex2 aic ${page === "index" && "active"}`}>
          <img src={require("../assest/img/home.png")} alt="" />
          <span>首页</span>
        </Link>
        <Link to="/cart" className={`flex2 aic ${page === "cart" && "active"}`}>
          <img src={require("../assest/img/cart.png")} alt="" />
          <span>购物车</span>
        </Link>
        <Link to="/my" className={`flex2 aic ${page === "my" && "active"}`}>
          <img src={require("../assest/img/me.png")} alt="" />
          <span>我的</span>
        </Link>
      </div>
    );
  }
}

export default Footer;
